import gData from '@/util/globalData.js'
const app = {
	namespaced: true,
	state: {
		hostName: 'Jok后台管理',
		isLogin: false,
		webHeight: '',
		refresh: true,
		theme: ''
	},
	getters: {
		//authLists : state => state.authList
	},
	mutations: {
		changeHostName: (state, str) => {
			state.hostName = str
		},
		changeIsLogin: (state, bool) => {
			state.isLogin = bool
		},
		changeWebHeight: (state, str) => {
			state.webHeight = str
		},
		changeRefresh: (state, bool) => {
			state.refresh = bool
		},
		changeTheme: (state, str) => {
			state.theme = str || 'blue'
			gData.setLocal('theme', str || 'blue')
			window.document.documentElement.setAttribute('data-theme', str || 'blue')
		}
	}
}

export default app
